<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link href="/img/logo.png" rel="shortcut icon">
    {{ HTML::style('css/menu.css'); }}
    {{ HTML::style('css/general.css'); }}
    {{ HTML::style('css/bootstrap.css'); }}
    {{ HTML::style('css/login.css');  }}
    @yield("metadata")
  </head>
  <body>
      <div id="header" class="game-page">
        <?php
            $headerItems = array();
            $classes = array('agencia', 'servisos', 'portfolio', 'clientes', 'contato');
            $categories = array(
                array('name' => 'strategy', 'title' => 'strategy'),
                array('name' => 'action', 'title' => 'Action'),
                array('name' => 'sport', 'title' => 'Sport'),
                array('name' => 'puzzle',  'title' => 'Puzzle'),
                array('name' => 'racing', 'title' => 'Racing')
            );
            
            $index=0;
            foreach($categories as $category)
            {
              $headerItems[$index] = array(
                'title' => $category['title'],
                'href'  => '#',
                'class' => $classes[$index]
              );
              $index++;
            }
        ?>

        <div class="top-menu-wrap">
          <div id="menu">
            {{ HTML::link('/', '', array('id' => 'logo')) }}
            <div class="global-nav">
              <input id="search-box" type="text" name="search" value="Search">
              <ul class="login">
                @if (Auth::check())
                <li>
                  <span>Hello {{ Auth::user()->username; }}</span>
                  <a href="{{ URL::route("user/logout") }}">Logout</a> |
                  <a href="{{ URL::route("user/profile") }}">Your Profile</a>
                @else
                  <span>Have an account? </span>
                  <a href="{{ URL::route("user/login") }}">Sign In</a> | 
                  <a href="{{ URL::route("user/register") }}">Register</a>
                @endif
                <li><a class="facebook-icon"></a></li>
                <li><a class="twitter-icon"></a></li>
                <li><a class="google-icon"></a></li>
              </ul>
            </div>
            <ul>       
            <?php
              foreach ($headerItems as $item)
                print '<li>' . HTML::link($item['href'], $item['title'], array('class' => 'label-title ' . $item['class'])) . '</li>';
            ?>
            </ul>
          </div>   
        </div>
        <div class="clear"></div>
      </div>

      <div class="clear"></div>
      <div id="content">
          <div class="container">
              @yield("content")
          </div>
      </div>
      <div id="footer">
        <div class="footer-wrap">
          <div id="copyright" class="left">Copyright © 2013 Bencheci</div>
          <div class="right" id="links">
            <a href="/about">About us</a><span> |</span>
            <a href="/contacts">Contacts</a><span> |</span>
            <a href="/description">Description</a>
          </div>
        </div>
      </div>
  </body>
</html>